package com.huai.demo_test1.singletionsecond;import com.huai.demo_test1.singletionsecond.hungry.HungrySingleton;public class Test{    public static void main(String[] args) {        Thread t1 = new MyThread();        Thread t2 = new MyThread();        t1.start();        t2.start();    }}class MyThread extends Thread{    @Override    public void run() {        System.out.println(HungrySingleton.getInstance()); //打印生成的实例，会输出实例的类名+哈希码值    }}